package org.jeecg.modules.basedata.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.entity.basedata.BaseCustomer;
import org.jeecg.entity.basedata.BaseRoom;
import org.jeecg.entity.basedata.RoomVo;
import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.modules.system.model.TreeModel;
import org.jeecg.vo.basedata.BaseRoomPage;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 房间
 * @Author: jeecg-boot
 * @Date:   2019-07-03
 * @Version: V1.0
 */
public interface IBaseRoomService extends IService<BaseRoom> {

	public List<SysDepartTreeModel> queryFloorTreeList();

	List<BaseRoom> getByRentStatus(String floorId, Integer rentStatus);

	public List<TreeModel> findRoomTreeList(BaseRoom baseRoom);

	public BaseRoomPage selectByMainId(String mainId);

	BaseRoom getBaseRoomByName(String roomName,String floorId);

	void updateBatchRoomStatus(List<BaseRoom> roomList);

	void addRoomCustomer(List<BaseRoom> roomList, List<BaseCustomer> customerList);

//	/**
//	 * 添加一对多
//	 *
//	 */
//	public void saveMain(BaseRoom baseRoom, BaseRoomInfo baseRoomInfoList) ;
//
//	/**
//	 * 修改一对多
//	 *
//	 */
//	public void updateMain(BaseRoom baseRoom, BaseRoomInfo baseRoomInfoList);
	
	/**
	 * 删除一对多
	 */
	public void delMain(String id);
	
	/**
	 * 批量删除一对多
	 */
	public void delBatchMain(Collection<? extends Serializable> idList);

	/**
	 * 同步修改房间状态
	 * @param upRoomId
	 * @param upRoomStatus
	 */
	public void updateRoomStatus(String upRoomId,String upRoomStatus);

	/**
	 * 迁出时同步房间状态
	 * @param syRoomId
	 */
	public  void syupdateRoomStatus(String syRoomId);


	public List<BaseRoom> getByRoomIds(String [] roomIds);

	public  BaseRoom  getByBaseRoom(String id);

	/**
	 * 模糊查询
	 * @param page
	 * @param baseRoom
	 * @return
	 */
	public Page<BaseRoom> listByParams(Page<BaseRoom> page , BaseRoom baseRoom);

	public Integer getPeopeleCount(String id);

	public Integer getPeopeleCounts(String[] id);

	public List<RoomVo> getByFloorId(String floorId);

    String queryRoomName(String floorId, String roomName);

    BaseRoom getByFloorIdName(String floorId, String name);

    Integer checkRoomName(String name, String floorId);

	List<SysDepartTreeModel> queryTenantList(String floorId);

	List<SysDepartTreeModel> queryCustomerList(String floorId);

	String getRoomAddress(String id);

    List<String> getAllFeeItemId(List<String> roomId);

	void updateSpiltDate(BaseRoom baseRoom);

    Page<BaseRoom> queryRoomFeeList(Page<BaseRoom> pageList, BaseRoom baseRoom);


	Page<BaseRoom> getRoomList(Page<BaseRoom> pageList, String projectId,String feeRuleId,String roomId,String floorId);

	/**
	 * 更新房间名
	 * @param roomist
	 */
	void updateBatchRoomName(List<BaseRoom> roomist,BaseRoom baseRoom);

	List<SysDepartTreeModel> queryRoomTreeList(BaseRoom baseRoom);
}
